﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="changepwd.aspx.cs" Inherits="Com.Rivyer.Web.personal.changepwd" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>修改密码</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            margin-left: 3px;
            margin-right: 3px;
        }
        .style1
        {
            width: 283px;
        }
        .style2
        {
            width: 245px;
        }
    </style>
</head>
<body>
    <%if (DesignMode)
      { %>
    <script type="text/javascript" src="../js/ASPxScriptIntelliSense.js"></script>
    <%} %>
    <script type="text/javascript">
        function onNewpwdValidate(s, e) {
            var newpwd = ASPxClientTextBox.Cast("newpwdclient");
            var newtext = newpwd.GetText();
            var originpwd = ASPxClientTextBox.Cast("originpwdClient");
            var origintext = originpwd.GetText();
            if (newtext.length <= 5) {
                e.isValid = false;
            }

            if (newtext == origintext) {
                e.isValid = false;
            }
        }

        function onConfirmpwdValidate(s, e) {
            var newpwd = ASPxClientTextBox.Cast("newpwdclient");
            var confirmpwd = ASPxClientTextBox.Cast("confirmpwdclient");
            if (String(newpwd.GetText()) != String(confirmpwd.GetText())) {
                e.isValid = false;
            }
        }
    </script>
    <form id="form1" runat="server">
    <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="24" bgcolor="#353c44">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="6%" height="19" valign="bottom">
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="14" height="14" /></div>
                                                    </td>
                                                    <td width="94%" valign="bottom">
                                                        <span class="STYLE1">修改密码</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <div class="divcontent">
                        <table class="contentpage" cellpadding="0" cellspacing="0" style="text-align: center">
                            <tr>
                                <th colspan="2" align="center">
                                    修改密码
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="用户名:">
                                    </dx:ASPxLabel>
                                </td>
                                <td class="style2" align="left">
                                    <dx:ASPxLabel ID="username" runat="server" Text="">
                                    </dx:ASPxLabel>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="原密码:">
                                    </dx:ASPxLabel>
                                </td>
                                <td class="style2">
                                    <dx:ASPxTextBox ID="originpwd" runat="server" Width="170px" Password="True" ClientInstanceName="originpwdClient">
                                        <ValidationSettings ErrorDisplayMode="ImageWithTooltip" ErrorText="原密码不能为空" Display="Dynamic">
                                            <RequiredField IsRequired="true" ErrorText="原密码不能为空!" />
                                        </ValidationSettings>
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="新密码:">
                                    </dx:ASPxLabel>
                                </td>
                                <td class="style2">
                                    <dx:ASPxTextBox ID="newpwd" runat="server" Width="170px" Password="True" ClientInstanceName="newpwdclient">
                                        <ValidationSettings ErrorDisplayMode="ImageWithTooltip" ErrorText="新密码长度不能小于5并且不能和原密码相同!"
                                            Display="Dynamic">
                                            <RequiredField IsRequired="true" ErrorText="新密码不能为空!" />
                                        </ValidationSettings>
                                        <ClientSideEvents Validation="onNewpwdValidate" />
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <dx:ASPxLabel ID="ASPxLabel4" runat="server" Text="确认密码:">
                                    </dx:ASPxLabel>
                                </td>
                                <td class="style2">
                                    <dx:ASPxTextBox ID="confirmpwd" runat="server" Width="170px" Password="True" ClientInstanceName="confirmpwdclient">
                                        <ValidationSettings ErrorDisplayMode="ImageWithTooltip" ErrorText="确认密码与新密码不相符" Display="Dynamic">
                                            <RequiredField IsRequired="true" ErrorText="确认密码不能为空!" />
                                        </ValidationSettings>
                                        <ClientSideEvents Validation="onConfirmpwdValidate" />
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                            <tr align="center">
                                <td colspan="2">
                                    <dx:ASPxButton ID="confirm" runat="server" Text="确认修改" OnClick="confirm_Click">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
